Performance monitoring of wait times

ABSTRACT

Embodiments of the present disclosure include a method, a system, and a computer program product for determining wait times of tuples within a streaming environment. The method includes monitoring one or more tuples being processed within an operator graph where the operator graph includes a first processing element and a queue of the first processing element. The method includes recording a wait time of the one or more tuples within the queue of the first processing element. The method includes recording a processing time time of the one or more tuples within the first processing element. The method includes displaying the wait time and the processing time of the one or more tuples. The method includes optimizing a configuration of the operator graph, in response to recording the processing time of the one or more tuples.

BACKGROUND

This disclosure generally relates to stream computing, and inparticular, to computing applications that receive streaming data andprocess the data as it is received.

Database systems are typically configured to separate the process ofstoring data from accessing, manipulating, or using data stored in adatabase. More specifically, database systems use a model in which datais first stored and indexed in a memory before subsequent querying andanalysis. In general, database systems may not be well suited forperforming real-time processing and analyzing streaming data. Inparticular, database systems may be unable to store, index, and analyzelarge amounts of streaming data efficiently or in real time.

SUMMARY

Embodiments of the disclosure provide a method, system, and computerprogram product for monitoring wait times of tuples within a streamingenvironment. The method, system, and computer program product receivetwo or more tuples to be processed by a plurality of processing elementsthat are operating on one or more computer processors.

One embodiment is directed toward a method for determining wait statesof tuples within a streaming environment. The method includes monitoringone or more tuples being processed within an operator graph where theoperator graph includes a first processing element and a queue of thefirst processing element. The method includes recording a wait time ofthe one or more tuples within the queue of the first processing element.The method includes recording a processing time of the one or moretuples within the first processing element. The method includesdisplaying the wait time and the processing time of the one or moretuples. The method includes optimizing a configuration of the operatorgraph, in response to recording the processing time of the one or moretuples.

Another embodiment is directed toward a system for determining waitstates of tuples within a streaming environment. The system includes amemory, and a processor device communicatively coupled to the memory.The memory and processor device are also communicatively coupled to astream manager that is configured to monitor one or more tuples beingwithin the processing stage of a processing element within the streamingenvironment. The stream manager is configured to monitor one or moretuples being processed within an operator graph where the operator graphincludes a first processing element and a queue of the first processingelement. The stream manager is configured to record a wait time of theone or more tuples within the queue of the first processing element. Thestream manager is configured to record a processing time of the one ormore tuples within the first processing element. The stream manager isconfigured to display the wait time and the processing time of the oneor more tuples. The stream manager is configured to optimize aconfiguration of the operator graph, in response to recording theprocessing time of the one or more tuples.

Yet another embodiment is directed toward a computer program product fordetermining wait states of tuples within a streaming environment. Thecomputer program product is configured to monitor one or more tuplesbeing processed within an operator graph where the operator graphincludes a first processing element and a queue of the first processingelement. The computer program product is configured to record a waittime of the one or more tuples within the queue of the first processingelement. The computer program product is configured to record aprocessing time of the one or more tuples within the first processingelement. The computer program product is configured to display the waittime and the processing time of the one or more tuples. The computerprogram product is configured to optimize a configuration of theoperator graph, in response to recording the processing time of the oneor more tuples.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a computing infrastructure configured to execute astream computing application according to various embodiments.

FIG. 2 illustrates a more detailed view of a compute node of FIG. 1according to various embodiments.

FIG. 3 illustrates a more detailed view of the management system of FIG.1 according to various embodiments.

FIG. 4 illustrates a more detailed view of the development system ofFIG. 1 according to various embodiments.

FIG. 5 illustrates an operator graph for a stream computing applicationaccording to various embodiments.

FIG. 6 illustrates of a source to sink streaming environment, accordingto various embodiments.

FIG. 7A illustrates a processing element with four tuples in a queue,according to various embodiments.

FIG. 7B illustrates a processing element with three tuples in a queueand one processed tuple, according to various embodiments.

FIG. 7C illustrates a processing element with two tuples in a queue andtwo processed tuples, according to various embodiments.

FIG. 8 illustrates a flowchart to monitor the wait times of the tupleswithin the streaming environment, according to various embodiments.

FIG. 9 illustrates a flowchart to determine a difference in wait timesof the tuples within the streaming environment, according to variousembodiments.

While the invention is amenable to various modifications and alternativeforms, specifics thereof have been shown by way of example in thedrawings and will be described in detail. It should be understood,however, that the intention is not to limit the invention to theparticular embodiments described. On the contrary, the intention is tocover all modifications, equivalents, and alternatives falling withinthe spirit and scope of the invention.

DETAILED DESCRIPTION

Aspects of the present disclosure relate to stream computing, moreparticular aspects relate to determining wait times of tuples within adata stream. While the present disclosure is not necessarily limited tosuch applications, various aspects of the disclosure may be appreciatedthrough a discussion of various examples using this context. Thedisclosure monitors the movement of tuples throughout the streamsenvironment as the tuples wait to enter processing elements, and areprocessed by processing elements.

Stream-based computing and stream-based database computing are emergingas a developing technology for database systems. Products are availablewhich allow users to create applications that process and querystreaming data before it reaches a database file. With this emergingtechnology, users can specify processing logic to apply to inbound datarecords while they are “in flight,” with the results available in a veryshort amount of time, often in fractions of a second. Constructing anapplication using this type of processing has opened up a newprogramming paradigm that will allow for development of a broad varietyof innovative applications, systems, and processes, as well as presentnew challenges for application programmers and database developers.

In a stream computing application, stream operators are connected to oneanother such that data flows from one stream operator to the next (e.g.,over a TCP/IP socket). When a stream operator receives data, it mayperform operations, such as analysis logic, which may change the tupleby adding or subtracting attributes, or updating the values of existingattributes within the tuple. When the analysis logic is complete, a newtuple is then sent to the next stream operator. Scalability is achievedby distributing an application across nodes by creating executables(i.e., processing elements), as well as replicating processing elementson multiple nodes and load balancing among them. Stream operators in astream computing application can be fused together to form a processingelement that is executable. Doing so allows processing elements to sharea common process space, resulting in much faster communication betweenstream operators than is available using inter-process communicationtechniques (e.g., using a TCP/IP socket). Further, processing elementscan be inserted or removed dynamically from an operator graphrepresenting the flow of data through the stream computing application.A particular stream operator may not reside within the same operatingsystem process as other stream operators. In addition, stream operatorsin the same operator graph may be hosted on different nodes, e.g., ondifferent compute nodes or on different cores of a compute node.

Data flows from one stream operator to another in the form of a “tuple.”A tuple is a sequence of one or more attributes associated with anentity. Attributes may be any of a variety of different types, e.g.,integer, float, Boolean, string, etc. The attributes may be ordered. Inaddition to attributes associated with an entity, a tuple may includemetadata, i.e., data about the tuple. A tuple may be extended by addingone or more additional attributes or metadata to it. As used herein,“stream” or “data stream” refers to a sequence of tuples. Generally, astream may be considered a pseudo-infinite sequence of tuples.

Tuples are received and output by stream operators and processingelements. An input tuple corresponding with a particular entity that isreceived by a stream operator or processing element, however, isgenerally not considered to be the same tuple that is output by thestream operator or processing element, even if the output tuplecorresponds with the same entity or data as the input tuple. An outputtuple need not be changed in some way from the input tuple.

Nonetheless, an output tuple may be changed in some way by a streamoperator or processing element. An attribute or metadata may be added,deleted, or modified. For example, a tuple will often have two or moreattributes. A stream operator or processing element may receive thetuple having multiple attributes and output a tuple corresponding withthe input tuple. The stream operator or processing element may onlychange one of the attributes so that all of the attributes of the outputtuple except one are the same as the attributes of the input tuple.

Generally, a particular tuple output by a stream operator or processingelement may not be considered to be the same tuple as a correspondinginput tuple even if the input tuple is not changed by the processingelement. However, the run environment of the the present description andthe claims, may include an output tuple that has the same dataattributes or is associated with the same entity as a correspondinginput tuple which will be referred to herein as the same tuple unlessthe context or an express statement indicates otherwise.

Performance issues in computing may involve an application waiting forsomething within the streaming environment. For example, the applicationmay wait for processing elements to perform operations within thestreaming environment. These performance issues may also causeapplications to be unable to use all the processing power available.Underutilized processing power of a central processing unit (CPU) mayincrease difficulty in determining and solving performance issuescompared to an overburdened CPU. Traditional operating systems oftenhave performance tools that assist a user in understanding why anapplication is waiting. If the application is waiting, the wait timewithin the streaming environment may determine a wait condition.Conditions causing the application to wait may be known as waitconditions. The wait conditions may join to from wait buckets. Waitbuckets may be monitored within the streaming environment to determinewhere and why the data or tuples are waiting. Wait buckets may include acollection of tuple data of the tuples waiting within the streamsenvironment.

When tuples enter the streaming environment, they may enter one or moreprocessing elements that perform various operations on the tuples. Theamount of time the tuple spends within the streaming environment may berecorded as an execution time. The execution time may measure the pointin time the tuple enters the streaming environment, to the point in timethe tuple leaves the streaming environment. The points in time may berecorded as time stamps where a first time stamp is recorded when thetuple enters the streaming environment, and a second time stamp isrecorded when the tuple leaves the streaming environment.

The tuples may also spend time within the processing elements of thestreaming environment. The amount of time the tuple spends within theprocessing elements may be recorded as a processing time. The processingtime may measure the point in time the tuple enters a processingelement, to the point in time the tuple leaves the processing element.The points in time may be recorded as time stamps where a first timestamp may be recorded when the tuple enters the processing element, anda second time stamp is recorded when the tuple leaves the processingelement.

The streaming environment may use “hooks” to provide wait stateinformation to users and applications when requested. In a streamingenvironment, these hooks may be programed and inserted into thestreaming environment. The hooks may be inserted to capture additionalwait state information when the current wait state information isinsufficient to discern why an application waits. The wait stateinformation may also be used to determine what causes bottlenecks withinthe streaming environment.

Tuples may have characteristics that are specific to the tuple within astreaming environment. Characteristics of the tuple may cause othertuples to wait at a queue of a processing element, described furtherherein. A tuple characteristic may include the attributes of the tuple.For example, the tuple characteristic may include the number ofattributes or traits of attributes the tuple has. A trait of a tuple mayinclude a value of an attribute. The characteristics may cause the tupleto have an increased processing time within a processing element as theprocessing element operates on the tuple. Tuple characteristics may alsoinclude queue wait times when the tuple has to wait before entering aprocessing element. Tuples may be monitored to determine where and whyare stalled inside an operator graph and not consuming CPU resources.The information may be gathered by the hooks, which may gather theinformation by monitoring the tuples to provide an end user with waitstate information of the stream. An example of the end user may includea stream administrator or network administrator monitoring the streamingenvironment.

The wait time of the tuples may be monitored and measured based on theconfiguration of the streaming environment. For example, the processingtime of the tuples within the processing element may be measured inminutes, seconds, or milliseconds. When tuples increase in complexity orinclude difficult to process attributes, the wait time of the tuple mayincrease compared to less complex tuples.

Wait state information may be gathered as tuples move through thestreaming environment. The wait state information may be displayed on agraphical user interface (GUI) that may be monitored by an end user. Thewait state information may be gathered by bucketing the wait types andwait times with the associated tuples. Bucketing of the wait stateinformation can include gathering the wait state information for eachqueue or processing element the tuple may wait within the streamingenvironment. The wait buckets may then be gathered to determinelocations the tuple may have waited within the streaming environment.Trace type tools and statistical collection mode tools may beincorporated to better monitor the streaming environment.

The hooks may be utilized to gather wait state information within thestreaming environment. The hooks may be used to keep track of tuples asthey are passed from a first processing element to a second processingelement as well as a wait time between the first processing element andthe second processing element. To monitor the tuples, tupleidentification numbers (tuple IDs) may be used to identify the tuples.The tuple IDs may be used to distinguish tuples from one another. Forexample, a first tuple may be assigned a tuple ID of T1, while a secondtuple may be assigned a tuple ID of T2, thus distinguishing the firsttuple from the second tuple. The tuple IDs may also be used to group thetuples by tuple types. The tuple types may group one or more tuples bytheir attributes. The one or more tuples may be grouped by the data orattributes the one or more tuples have in common. Tuples that weregrouped by their attributes may be monitored to determine if givenvalues for attributes cause additional waiting. By grouping the waittime of the tuple, the wait time may be linked to specificcharacteristics of the tuples.

In various embodiments, the bucketing of tuples may be used to determineif there are correlations between attributes and wait times of thetuples. Grouping may include determining attributes of the tuples andgrouping one or more tuples with the same attribute. The attributes ofthe tuples may cause the tuple to have an increased wait time within theprocessing element. For example, if a first attribute may require alonger processing time than a second attribute. If tuples are groupedaccording to attributes the tuples share, the attributes can bemonitored within multiple tuples of the streaming environment. Forexample, depending upon the attributes of the tuple processing elementsmay take a longer time to process a tuple with a first attribute whencompared to a tuple with a second attribute. The processing time of thefirst tuple may be more than the second tuple casing a wait time of thetuple within the queue of the second tuple to be longer than a tuplewaiting for the second tuple to be processed. The processing time, orwait time of the tuple may correlate between all tuples with the sameattribute.

In various embodiments, the tuples with a same trait of an attribute maybe grouped and assigned an average wait time when outputted to the enduser. The average wait time may be determined by averaging the wait timeof every tuple with the attribute being monitored within a specificprocessing element. The average may be calculated using the wait time ofeach of the tuples. If tuples with a processing time of the firstattribute fall outside of a mean value when compared to the tupleswithin the same attribute, then the tuples with the first attribute maybe averaged. The tuples that fall outside the mean value may be treatedas tuples within a singular identity. The tuples may be treated as asingular identity to determine if a specific attribute causes the tupleto take more time to be processed. The wait times within each processingelement may also be monitored to determine which processing elementcaused the tuples with the first attribute to consistently wait. Forexample, if the wait times of the tuple with the first attribute are notconsistent within each processing element, then the wait times may beaveraged. An example of sporadic wait time may include three tuples withthe same trait for an attribute. The tuples may include a 3 second waittime for the first tuple, a 3 second wait time for the second tuple, anda 4 second wait time for the third tuple. These wait times may beaveraged for a 3.33 second wait time for the group of tuples.

In various embodiments, each tuple may be treated as a singular tuplewith a singular identity, instead of grouping the tuples by attribute.Tracking each tuple individually may allow for a trace mode monitoringof the tuples. The trace mode monitoring may include a more detailedmonitoring of a tuple as compared to grouping the tuples by attribute.

In various embodiments, after monitoring wait state information of theprocessing elements, specific wait type conditions may be monitoredwithin the streaming environment. Examples of specific wait typeconditions may include wait time within a queue, wait time withinspecific processing elements, or specific tuple wait time tracking.Examples of specific processing elements could include barrieroperators, join operators, sort operators, assignation operators, sortoperators, filter operators, or custom operators. An example of specifictuple wait time tracking may include tracking a first tuple as the tuplemoves from a first queue to a first processing element. The use andapplication of the specific tuple wait time tracking conditions aredescribed further herein.

The wait time in a queue before being processed by a processing elementmay be used to determine the wait time of the tuples between processingelements. When the processing element performs operations upon thetuples, the tuple can be considered within the processing stage of theprocessing element. The tuples may be monitored to determine queue timesor wait times of tuples not within a processing element. These tuplesmay be waiting to enter a processing element. The tuples waiting toenter a processing element may be monitored to determine a wait time forthe queue. The queue time may be tracked by the stream manager for eachof the tuples waiting to enter a processing element. The queue times mayalso be bucketed to determine the wait times of all of the tupleswaiting to enter the processing element.

In various embodiments, the wait time of the queue may be measured by atime stamp generated from the tuples entering and leaving processingelements. The time stamp may include the time the tuple left a firstprocessing element and entered a second processing element. The queuetime could include the time the tuple spent between leaving the firstprocessing element and entering the second processing element. Forexample, a first tuple may receive a first time stamp upon entering thestreaming environment. A second time stamp may be assigned to the firsttuple upon entering a first queue of a first processing element, and athird time stamp may be assigned to the first tuple when the first tupleleaves the first queue of the first processing element and enters thefirst processing element. After being processed by the first processingelement, the tuple may receive a fourth time stamp upon leaving thefirst processing element. The time stamping may continue assigningsubsequent time stamps to the tuple based on the location of the firsttuple with the streaming environment. When the tuple reaches the finalprocessing element or sink of the streaming environment, the tuple mayreceive a final or end time stamp indicating that the tuple has left thestreaming environment. The time from when the tuple entered thestreaming environment, first time stamp, to the point the tuple leavesthe streaming environment, end time stamp, may be recorded as anexecution time. The execution time may include the length of time thetuple spends within the streaming environment.

A barrier operator may include an operator that requires one or moretuple inputs to be processed. The barrier operator may be utilized tomerge two or more input streaming environment that are logicallysimilar. An example a barrier operator within the streaming environmentmay include waiting on four unique streaming environment of data exists.A tuple may arrive at a first processing element and has to wait fordata or a tuple at a second processing element, a third processingelement, and a fourth processing element. When the barrier operatorreceives data that tuples have reached all four processing elements, thetuples may leave the barrier operator, and the amount of time the tuplespends waiting for the barrier operator may be recorded as a waitcondition. If one or more tuples are held by the barrier operator, thenthe barrier operator may output one tuple ID from the one or more tuplesthat were held by the barrier operator. For example, if four tuples wereheld in the first, second, third, and fourth processing elements, onlyone tuple ID may be outputted. The outputted tuple ID may include one ofthe four that were used by the barrier operator, or the tuple ID may bea newly generated tuple ID. If a newly generated tuple ID is used, thetuple IDs processed by the barrier operator may be linked to the newlygenerated tuple ID.

A join operator may be monitored for wait times within the streamingenvironment. The join operator may include two or more sendingprocessing elements that send data or tuples to a single receivingprocessing element. A join operator may be monitored for the wait timewhen a join condition for a given tuple is reached. The join operatorcan receive two tuples from one or more processing elements and jointhem together. For example, when two processing elements are sendingprocessing elements, tuples of each processing element may be matched.The tuples within the first processing element maybe matched with thetuples within the second processing element and the matched tuples maybe sent to a third processing element. The third processing element mayreceive the joined tuples as a single tuple. The tuple ID of a joinedtuple may include the tuple ID of one of the two tuples that werejoined, or the tuple ID of the received tuple may be a newly generatedtuple ID. The amount of time the tuple spend waiting to enter the joinoperator may be recorded as a wait condition. The wait condition may bea processing time or a wait time where the tuple had to wait forsomething within the streams environment. The wait condition can begathered by a hook to provide information to an end user.

A window operator may be monitored for wait times within the streamingenvironment. Window operators may be similar to both join and barrieroperators, but may cause a tuple to not leave the window operator.Tuples within a window operator may be joined to other tuples within thesame windowing operator. Tuples that occur infrequently may cause tuplespaired with the infrequent tuples to wait a longer time than tuples withmore frequent pairings. In various embodiments, a tuple may not leave awindow operator if a pair matching the tuple does not enter the windowoperator. The amount of time the tuple spend waiting to leave the windowoperator may be recorded as a wait condition. The wait condition may bea processing time or a wait time where the tuple had to wait forsomething within the streams environment. The wait condition can begathered by a hook to provide information to an end user.

To track the movement of tuples within and/or between processingelement, tuple IDs may be assigned to all tuples entering the stream.Processing elements may include a different solution for hard to tracktuples. To monitor the hard to track tuples, the tuple IDs may bemonitored as the tuples are passed into and out of an operator. The hardto track tuples may also be monitored to determine if the tuples leave(or are removed from) a streaming environment without entering a sink.An example of a tuple being removed from a streaming environment couldinclude a processing element that is a filter. The filter may be used toremove tuples from the stream. If a tuple is filtered out of thestreaming environment, the tuple may enter a processing element, but notenter the following queue. Filters may be monitored separately for thewait time of the tuple within the filter. Filters may also be monitoredfor the tuple attributes that the filter is designed to remove from thestream. After the tuple leaves the streaming environment, the time thetuple spends within the streaming environment can be recorded as anexecution time.

The resulting wait times may be displayed on an input/output (I/O)device or a GUI. The GUI may be accessible by an end user to determinethe wait state information of the streaming environment. Thedetermination of the wait state information will be described furtherherein.

FIG. 1 illustrates one exemplary computing infrastructure 100 that maybe configured to execute a stream computing application, according tosome embodiments. The computing infrastructure 100 includes a managementsystem 105 and two or more compute nodes 110A-110D—i.e., hosts—which arecommunicatively coupled to each other using one or more communicationsnetworks 120. The communications network 120 may include one or moreservers, networks, or databases, and may use a particular communicationprotocol to transfer data between the compute nodes 110A-110D. Adevelopment system 102 may be communicatively coupled with themanagement system 105 and the compute nodes 110 either directly or viathe communications network 120.

The communications network 120 may include a variety of types ofphysical communication channels or “links.” The links may be wired,wireless, optical, or any other suitable media. In addition, thecommunications network 120 may include a variety of network hardware andsoftware for performing routing, switching, and other functions, such asrouters, switches, or bridges. The communications network 120 may bededicated for use by a stream computing application or shared with otherapplications and users. The communications network 120 may be any size.For example, the communications network 120 may include a single localarea network or a wide area network spanning a large geographical area,such as the Internet. The links may provide different levels ofbandwidth or capacity to transfer data at a particular rate. Thebandwidth that a particular link provides may vary depending on avariety of factors, including the type of communication media andwhether particular network hardware or software is functioning correctlyor at full capacity. In addition, the bandwidth that a particular linkprovides to a stream computing application may vary if the link isshared with other applications and users. The available bandwidth mayvary depending on the load placed on the link by the other applicationsand users. The bandwidth that a particular link provides may also varydepending on a temporal factor, such as time of day, day of week, day ofmonth, or season.

FIG. 2 is a more detailed view of a compute node 110, which may be thesame as one of the compute nodes 110A-110D of FIG. 1, according tovarious embodiments. The compute node 110 may include, withoutlimitation, one or more processors (CPUs) 205, a network interface 215,an interconnect 220, a memory 225, and a storage 230. The compute node110 may also include an I/O device interface 210 used to connect I/Odevices 212, e.g., keyboard, display, and mouse devices, to the computenode 110.

Each CPU 205 retrieves and executes programming instructions stored inthe memory 225 or storage 230. Similarly, the CPU 205 stores andretrieves application data residing in the memory 225. The interconnect220 is used to transmit programming instructions and application databetween each CPU 205, I/O device interface 210, storage 230, networkinterface 215, and memory 225. The interconnect 220 may be one or morebusses. The CPUs 205 may be a single CPU, multiple CPUs, or a single CPUhaving multiple processing cores in various embodiments. In oneembodiment, a processor 205 may be a digital signal processor (DSP). Oneor more processing elements 235 (described below) may be stored in thememory 225. A processing element 235 may include one or more streamoperators 240 (described below). In one embodiment, a processing element235 is assigned to be executed by only one CPU 205, although in otherembodiments the stream operators 240 of a processing element 235 mayinclude one or more threads that are executed on two or more CPUs 205.The memory 225 is generally included to be representative of a randomaccess memory, e.g., Static Random Access Memory (SRAM), Dynamic RandomAccess Memory (DRAM), or Flash. The storage 230 is generally included tobe representative of a non-volatile memory, such as a hard disk drive,solid state device (SSD), or removable memory cards, optical storage,flash memory devices, network attached storage (NAS), or connections tostorage area network (SAN) devices, or other devices that may storenon-volatile data. The network interface 215 is configured to transmitdata via the communications network 120.

A stream computing application may include one or more stream operators240 that may be compiled into a “processing element” container 235. Thememory 225 may include two or more processing elements 235, eachprocessing element having one or more stream operators 240. Each streamoperator 240 may include a portion of code that processes tuples flowinginto a processing element and outputs tuples to other stream operators240 in the same processing element, in other processing elements, or inboth the same and other processing elements in a stream computingapplication. Processing elements 235 may pass tuples to other processingelements that are on the same compute node 110 or on other compute nodesthat are accessible via communications network 120. For example, aprocessing element 235 on compute node 110A may output tuples to aprocessing element 235 on compute node 110B.

The storage 230 may include a buffer 260. Although shown as being instorage, the buffer 260 may be located in the memory 225 of the computenode 110 or in a combination of both memories. Moreover, storage 230 mayinclude storage space that is external to the compute node 110, such asin a cloud.

The compute node 110 may include one or more operating systems 262. Anoperating system 262 may be stored partially in memory 225 and partiallyin storage 230. Alternatively, an operating system may be storedentirely in memory 225 or entirely in storage 230. The operating systemprovides an interface between various hardware resources, including theCPU 205, and processing elements and other components of the streamcomputing application. In addition, an operating system provides commonservices for application programs, such as providing a time function.

FIG. 3 is a more detailed view of the management system 105 of FIG. 1according to some embodiments. The management system 105 may include,without limitation, one or more processors (CPUs) 305, a networkinterface 315, an interconnect 320, a memory 325, and a storage 330. Themanagement system 105 may also include an I/O device interface 310connecting I/O devices 312, e.g., keyboard, display, and mouse devices,to the management system 105.

Each CPU 305 retrieves and executes programming instructions stored inthe memory 325 or storage 330. Similarly, each CPU 305 stores andretrieves application data residing in the memory 325 or storage 330.The interconnect 320 is used to move data, such as programminginstructions and application data, between the CPU 305, I/O deviceinterface 310, storage unit 330, network interface 315, and memory 325.The interconnect 320 may be one or more busses. The CPUs 305 may be asingle CPU, multiple CPUs, or a single CPU having multiple processingcores in various embodiments. In one embodiment, a processor 305 may bea DSP. Memory 325 is generally included to be representative of a randomaccess memory, e.g., SRAM, DRAM, or Flash. The storage 330 is generallyincluded to be representative of a non-volatile memory, such as a harddisk drive, solid state device (SSD), removable memory cards, opticalstorage, Flash memory devices, network attached storage (NAS),connections to storage area-network (SAN) devices, or the cloud. Thenetwork interface 315 is configured to transmit data via thecommunications network 120.

The memory 325 may store a stream manager 134. Additionally, the storage330 may store an operator graph 335. The operator graph 335 may definehow tuples are routed to processing elements 235 (FIG. 2) forprocessing.

The management system 105 may include one or more operating systems 332.An operating system 332 may be stored partially in memory 325 andpartially in storage 330. Alternatively, an operating system may bestored entirely in memory 325 or entirely in storage 330. The operatingsystem provides an interface between various hardware resources,including the CPU 305, and processing elements and other components ofthe stream computing application. In addition, an operating systemprovides common services for application programs, such as providing atime function.

FIG. 4 is a more detailed view of the development system 102 of FIG. 1according to some embodiments. The development system 102 may include,without limitation, one or more processors (CPUs) 405, a networkinterface 415, an interconnect 420, a memory 425, and storage 430. Thedevelopment system 102 may also include an I/O device interface 410connecting I/O devices 412, e.g., keyboard, display, and mouse devices,to the development system 102.

Each CPU 405 retrieves and executes programming instructions stored inthe memory 425 or storage 430. Similarly, each CPU 405 stores andretrieves application data residing in the memory 425 or storage 430.The interconnect 420 is used to move data, such as programminginstructions and application data, between the CPU 405, I/O deviceinterface 410, storage unit 430, network interface 415, and memory 425.The interconnect 420 may be one or more busses. The CPUs 405 may be asingle CPU, multiple CPUs, or a single CPU having multiple processingcores in various embodiments. In one embodiment, a processor 405 may bea DSP. Memory 425 is generally included to be representative of a randomaccess memory, e.g., SRAM, DRAM, or Flash. The storage 430 is generallyincluded to be representative of a non-volatile memory, such as a harddisk drive, solid state device (SSD), removable memory cards, opticalstorage, flash memory devices, network attached storage (NAS),connections to storage area-network (SAN) devices, or to the cloud. Thenetwork interface 415 is configured to transmit data via thecommunications network 120.

The development system 102 may include one or more operating systems432. An operating system 432 may be stored partially in memory 425 andpartially in storage 430. Alternatively, an operating system may bestored entirely in memory 425 or entirely in storage 430. The operatingsystem provides an interface between various hardware resources,including the CPU 405, and processing elements and other components ofthe stream computing application. In addition, an operating systemprovides common services for application programs, such as providing atime function.

The memory 425 may store a compiler 136. The compiler 136 compilesmodules, which include source code or statements, into the object code,which includes machine instructions that execute on a processor. In oneembodiment, the compiler 136 may translate the modules into anintermediate form before translating the intermediate form into objectcode. The compiler 136 may output a set of deployable artifacts that mayinclude a set of processing elements and an application descriptionlanguage file (ADL file), which is a configuration file that describesthe stream computing application. In some embodiments, the compiler 136may be a just-in-time compiler that executes as part of an interpreter.In other embodiments, the compiler 136 may be an optimizing compiler. Invarious embodiments, the compiler 136 may perform peepholeoptimizations, local optimizations, loop optimizations, inter-proceduralor whole-program optimizations, machine code optimizations, or any otheroptimizations that reduce the amount of time required to execute theobject code, to reduce the amount of memory required to execute theobject code, or both. The output of the compiler 136 may be representedby an operator graph, e.g., the operator graph 132.

The compiler 136 may also provide the application administrator with theability to optimize performance through profile-driven fusionoptimization. Fusing operators may improve performance by reducing thenumber of calls to a transport. While fusing stream operators mayprovide faster communication between operators than is available usinginter-process communication techniques, any decision to fuse operatorsrequires balancing the benefits of distributing processing acrossmultiple compute nodes with the benefit of faster inter-operatorcommunications. The compiler 136 may automate the fusion process todetermine how to best fuse the operators to be hosted by one or moreprocessing elements, while respecting user-specified constraints. Thismay be a two-step process, including compiling the application in aprofiling mode and running the application, then re-compiling and usingthe optimizer during this subsequent compilation. The end result may,however, be a compiler-supplied deployable application with an optimizedapplication configuration.

The memory 425 may also store a stream manager 134 configured to monitorthe streaming environment. The stream manger 134 may monitor theoperations of one or more processing elements within the streamingenvironment. The stream manager 134 may also output information from theprocessing elements to the interconnect 420 which may distribute theinformation to the rest of the development system 102.

FIG. 5 illustrates an exemplary operator graph 500 for a streamcomputing application beginning from one or more sources 135 through toone or more sinks 504, 506, according to some embodiments. This flowfrom source to sink may also be generally referred to herein as anexecution path. In addition, a flow from one processing element toanother may be referred to as an execution path in various contexts.Although FIG. 5 is abstracted to show connected processing elementsPE1-PE10, the operator graph 500 may include data flows between streamoperators 240 (FIG. 2) within the same or different processing elements.Typically, processing elements, such as processing element 235 (FIG. 2),receive tuples from the stream as well as output tuples into the stream(except for a sink—where the stream terminates, or a source—where thestream begins). While the operator graph 500 includes a relatively smallnumber of components, an operator graph may be much more complex and mayinclude many individual operator graphs that may be statically ordynamically linked together.

The example operator graph shown in FIG. 5 includes ten processingelements (labeled as PE1-PE10) running on the compute nodes 110A-110D. Aprocessing element may include one or more stream operators fusedtogether to form an independently running process with its own processID (PID) and memory space. In cases where two (or more) processingelements are running independently, inter-process communication mayoccur using a “transport,” e.g., a network socket, a TCP/IP socket, orshared memory. Inter-process communication paths used for inter-processcommunications can be a critical resource in a stream computingapplication. However, when stream operators are fused together, thefused stream operators can use more rapid communication techniques forpassing tuples among stream operators in each processing element.

The operator graph 500 begins at a source 135 and ends at a sink 504,506. Compute node 110A includes the processing elements PE1, PE2, andPE3. Source 135 flows into the processing element PE1, which in turnoutputs tuples that are received by PE2 and PE3. For example, PE1 maysplit data attributes received in a tuple and pass some data attributesin a new tuple to PE2, while passing other data attributes in anothernew tuple to PE3. As a second example, PE1 may pass some received tuplesto PE2 while passing other tuples to PE3. Tuples that flow to PE2 areprocessed by the stream operators contained in PE2, and the resultingtuples are then output to PE4 on compute node 110B Likewise, the tuplesoutput by PE4 flow to operator sink PE6 504. Similarly, tuples flowingfrom PE3 to PE5 also reach the operators in sink PE6 504. Thus, inaddition to being a sink for this example operator graph, PE6 could beconfigured to perform a join operation, combining tuples received fromPE4 and PE5. This example operator graph also shows tuples flowing fromPE3 to PE7 on compute node 110C, which itself shows tuples flowing toPE8 and looping back to PE7. Tuples output from PE8 flow to PE9 oncompute node 110D, which in turn outputs tuples to be processed byoperators in a sink processing element, for example, PE10 506.

Processing elements 235 (FIG. 2) may be configured to receive or outputtuples in various formats, e.g., the processing elements or streamoperators could exchange data marked up as XML documents. Furthermore,each stream operator 240 within a processing element 235 may beconfigured to carry out any form of data processing functions onreceived tuples, including, for example, writing to database tables orperforming other database operations such as data joins, splits, reads,etc., as well as performing other data analytic functions or operations.

The stream manager 134 of FIG. 1 may be configured to monitor a streamcomputing application running on compute nodes, e.g., compute nodes110A-110D, as well as to change the deployment of an operator graph,e.g., operator graph 132. The stream manager 134 may move processingelements from one compute node 110 to another, for example, to managethe processing loads of the compute nodes 110A-110D in the computinginfrastructure 100. Further, stream manager 134 may control the streamcomputing application by inserting, removing, fusing, un-fusing, orotherwise modifying the processing elements and stream operators (orwhat tuples flow to the processing elements) running on the computenodes 110A-110D.

Because a processing element may be a collection of fused streamoperators, it is equally correct to describe the operator graph as oneor more execution paths between specific stream operators, which mayinclude execution paths to different stream operators within the sameprocessing element. FIG. 5 illustrates execution paths betweenprocessing elements for the sake of clarity.

In FIG. 6, processing elements are placed within the streamingenvironment between a source 610 and a sink 612. Between the source andthe sink, the streaming environment can be an operator graph. Theoperator graph may include a section or a part the streaming environmentthat is being monitored. The processing elements may include operatorsto perform tasks upon tuples moving within the operator graph. Theprocessing elements may be monitored to determine the processing timesof the tuples within a processing element. The wait times may includethe queue wait time where the tuple is waiting between processingelements. The time the tuple spends within the operator graph is theexecution time for the tuple to enter and leave the operator graph. Theexecution time may include the wait times and processing times the tupleexperienced moving within the operator graph.

The processing elements may be placed between the source 610 and thesink 612. A first processing element (PE1) 632 has a first queue (Q1)622, a second processing element (PE2) 634 has a second queue (Q2) 624,and a third processing element (PE3) 636 has a third queue (Q3) 626. Theprocessing elements may be monitored by a stream manager 650 todetermine the wait times and processing times of the tuples. The queuesmay include a static bucket where tuples wait to enter the nextprocessing element. Each queue may be similar to the previous queue, andmay be used to monitor tuples before they enter the processing element.The information gathered by the stream manager 650 may then be outputtedto an input/output (I/O) device 660. The I/O device 660 for example, maybe a GUI to display the wait state information gathered by the streammanager 650.

A first tuple may enter the streaming environment through the source610. The first tuple may then enter Q1 622. The first tuple may waitwithin Q1 622 before entering PE1 632. The wait time of the first tuplewithin Q1 622 may be recorded by the stream manager 650. The first tuplemay then enter PE1 632. The first tuple may be operated on within PE1632 and the processing time of the PE1 may be recorded by the streammanager 650. After the first tuple is operated on by PE1 632, the firsttuple may enter the Q2 624 and wait to enter PE2 634. The wait time ofthe first tuple within Q2 624 may be recorded by the stream manager 650.The first tuple may then enter PE2 634. The first tuple may be operatedon within PE2 634 and the processing time of PE2 634 may be recorded bythe stream manager 650. After the first tuple is operated on by PE2 634,the first tuple may enter Q3 626 and wait to enter PE3 636. The waittime of the first tuple within Q3 626 may be recorded by the streammanager 650. The first tuple may then enter the PE3 636. The first tuplemay be operated on within PE3 636 and the processing time of PE3 636 maybe recorded by the stream manager 650. After the first tuple is operatedon by PE3 636, the first tuple may enter the sink 612 of the stream.

The (I/O) device 660 may receive the recorded wait times of the firsttuple from the stream manager 650 and output the wait state informationto an end user. The (I/O) device 660 may output the wait stateinformation on a GUI that may be monitored by the end user. In variousembodiments, the (I/O) device 660 may display the wait state informationin a table. The table may include, but is not limited to, a tuple ID, await time of the tuple within each queue (e.g. Q1, Q2, and Q3), and aprocessing time of the tuple within each processing element (e.g. PE1,PE2, and PE3). The wait time and processing times may also include atotal wait time within each queue, a total processing time within eachprocessing element, and a total wait time within the operator graph. Thewait time may also include time stamps of the tuple entering the stream,and a time stamp of the tuple exiting the operator graph. The timestamps may be used to calculate to total time the tuple spent within theoperator graph.

In various embodiments, a tuple may leave the operator graph through aprocessing element before the tuple reaches the sink. An example of atuple being removed from the operator graph may include a filterprocessing elements. For example, the filter processing element mayremove the tuple from the operator graph according to an attribute ofthe tuple. The execution time of the tuple after being removed from theoperator graph may be recorded by the stream manager 650. For example,when the tuple was removed from the operator graph, the wait time may berecorded as the tuple leaves the processing element. If the tuple leavesthe operator graph, the total wait time, processing time and executiontime may be recorded by the stream manager 650.

FIGS. 7A-C illustrates a streaming environment as tuples move from afirst queue into a first processing element. The tuples may then beprocessed by the first processing element and enter a second queue. Thestreaming environment may be monitored by a stream manager as tuplesmove from a first queue (Q1) 722 and are processed by a first processingelement (PE1) 732. The tuples may then leave PE1 732 and enter a secondqueue (Q2) 724. Four tuples are ordered within the Q1 722, and wait toenter PE1 732. The tuples may include a first tuple (T1) 701, a secondtuple (T2) 702, a third tuple (T3) 703, and a fourth tuple (T4) 704.

In FIG. 7A the first tuple 701 is next in line to leave Q1 722 and enterPE1 732. The wait time of the first tuple 701 may be recorded by thestream manager as the amount of time the first tuple waits within Q1722. The tuple the first tuple 701 may leave Q1 722 and enter PE1 732.

In FIG. 7B, the first tuple 701 has been processed by PE1 and has movedto a second queue (Q2) 724. The second tuple 702 may be next in line toleave Q1 722 and enter PE1 732. The wait time of the second tuple 702may be recorded by the stream manager as the amount of time second tuple702 waits within Q1 722. For example, the wait time of second tuple 702may include the amount of time the first tuple 701 took to leave Q1, theprocessing time for the first tuple to be processed by PE1 722, andenter Q2 724. The amount of wait time in the queue for the second tuple702 to enter PE1 732 includes the processing time of the first tuple 701within PE1 732. The second tuple 702 may then leave the Q1 722 and enterPE1 732, be processed by PE1 732 and have the processing time of thesecond tuple 702 recorded.

In FIG. 7C, the second tuple 702 has been processed by PE1 and has movedto a second queue (Q2) 724. The third tuple 703 may be next in line toleave Q1 722 and enter PE1 732. The wait time of the third tuple 703 maybe recorded by the stream manager as the amount of time the third tuple703 waits within Q1 722. For example, the wait time of the third tuple703 within Q1 722 may include the amount of time that the second tuple702 waited for the first tuple 701, and the processing time of thesecond tuple 702. The processing time of the second tuple 702 mayinclude the amount of time the second tuple 702 took to leave Q1, beprocessed by the PE1 722, and enter Q2 724. The third tuple 703 may thenleave Q1 722 and enter PE1 732 and have the processing time of the thirdtuple 703 recorded.

In various embodiments, the movement of the tuples may include waittimes within the queue. These wait times may include the processing timeof each tuple moving into and out of the processing element before thetuple being monitored enters the queue. For example, if the third tuple703 can be monitored for the wait time within the Q1 722 may include theprocessing time of the first tuple 701 and the second tuple 702 withinPE1 732. Once the third tuple 703 enters the PE1 732, the queue time ofQ1 722 may be recorded of the third tuple 703.

In various embodiments, a tuple may be duplicated in a second copy ofthe tuple. Each copy of a tuple may be monitored separately by thestream manager. The stream manager may assign a new ID to the copiedtuple or the stream manager could assign new tuple ID's to both of thetuples that were split.

FIG. 8 illustrates a flowchart of a method 800 for monitoring a waittime and processing time of one or more tuples within a streamingenvironment. A tuple may be monitored as the tuple moves through theprocessing elements of the streaming environment. The wait times of thetuple may be recorded to determine the total execution time of the tuplethrough the stream. The wait times of the tuple may also be recorded asthe amount of time the tuple spends within a queue or waiting for othertuples to be processed within the streaming environment. The tuple maybe waiting for other tuples within a queue or a processing elementbefore entering another processing element. The processing time of thetuple may also be recorded as the time the tuple spends within theprocessing elements of the stream.

In operation 802, each tuple entering the streaming environment isassigned a tuple ID. The ID number may be used to identify the tuple asthe tuple moves throughout the stream. At a point within the streamingenvironment, the tuple may be identified by the ID number assigned tothe tuple. For example, a hook may be used to gather a wait stateinformation of the tuple within the streaming environment by the IDnumber of the tuple. The wait state information may include the locationof the tuple within the streams environment, and the current wait orprocessing time of the tuple.

In operation 804, the tuples are grouped by their attributes. The IDnumbers of the tuples may be recorded by the stream manager. The tuplesmay also be grouped by traits of the tuples attributes based on thestreaming environment. For example, if the tuples are grouped by traitsof the tuples attributes, the tuples may be monitored as a group todetermine if various attributes cause tuples a longer wait time withinthe stream.

In various embodiments, the streaming environment may be a portion ofthe streaming environment being monitored by the stream manager. Forexample, if only a portion of the streaming environment is beingmonitored by the stream manager the tuples may enter the streamingenvironment from a processing element instead of the source. Forexample, if only a few processing elements of the streaming environmentare being monitored by the stream manager, the tuples may enter themonitored section from a processing element. Examples of processingelements that tuples may enter from may include, but is not limited to,sources, split operators, custom operators, join operators, or barrieroperators.

In various embodiments, the end of the monitored section of thestreaming environment by the stream manager may not be the sink. Forexample, if only a portion of the streaming environment is beingmonitored by the stream manager the tuples may exit the streamingenvironment from a processing element instead of the sink. Examples ofprocessing elements the tuple may leave the streaming environment frommay include, but is not limited to, sinks, filter operators, customoperators, join operators, split operators, or barrier operators.

In operation 806, a tuple is monitored as the tuple enters the stream.The tuple may include a trait of an attribute similar to another tuple.If the tuple includes a similar trait to another tuple, the tuples mayhave been grouped together in operation 804. The time spent of the tuplewithin each processing element may be used to determine if the sharedtrait has an effect on the wait time of the tuple within each processingelement.

In operation 808, the wait state information of a tuple may be gatheredwhen the tuple is within a queued state within the streamingenvironment. The wait state information may be gathered by the streammanager. If the tuple is waiting to enter a processing element, thetuple may be recorded as waiting in a queue of the streamingenvironment. For example, if a second tuple is waiting to enter aprocessing element, which is currently operating upon a first tuple,then the second tuple may have to wait until the first tuple has beenprocessed by the processing element. The second tuple may start a queueto wait within, which may cause every tuple following the second tupleto wait behind the second tuple before entering the processing element.

In operation 810, a tuple has entered a processing element and theprocessing time is being recorded. The processing time can be recordedas wait state information of the tuple may include the amount of timethe tuple takes to be processed by the processing element. For example,if the second tuple has entered the processing element, the tuple may beprocessed by the processing element. The amount of time the processingelement required to process the second tuple is recorded as processingtime of the second tuple.

In operation 812, the tuple is monitored to determine if the tuple hasleft the streaming environment. The tuple may have left the stream ormay remain within in the streaming environment by being sent to asubsequent processing element. If the tuple has left the stream, themethod 800 may progress to operation 814. For example, if a first tupleenters a first processing element and the processing element removes thetuple from the streaming environment, then the tuple may be consideredremoved from the streaming environment, and the method 800 may progressto operation 814. A tuple may also enter a sink of the streamingenvironment where the tuple may be removed from the streamingenvironment. For example, if the tuple passes through the lastprocessing element of the streaming environment being monitored by thestream manager and enters the sink of the stream, the tuple may beconsidered removed from the stream environment and the flowchart mayprogress to operation 814.

If the tuple remains within the streaming environment, the flowchart mayreturn to operation 808 where the tuple may continue being operated uponwithin the streaming environment. The tuple may exit a processingelement and enter a queue for a subsequent processing element. Forexample, the second tuple may exit a first processing element but remainwithin the streaming environment by entering a queue for a secondprocessing element. The second processing element may be operating on afirst tuple, the queue may retain the second tuple until the first tuplehas exited the second processing element.

A tuple may exit a processing element and enter a subsequent processingelement if the subsequent processing element is not operating on anothertuple. For example, a second tuple may exit a first processing unit butremain within the streaming environment by entering a second processingelement. The queue of the second processing element may not hold thesecond tuple if the second processing element is not operating upon atuple.

In operation 814, the tuple can be recorded as leaving the stream. Thetuple may be recorded as leaving the streaming environment by the streammanager. The stream manager may record the tuple ID of the tuple, andthe time stamp of the tuple leaving the streaming environment and outputthe information to an input/output (I/O) device. For example, if a firsttuple leaves the stream, the ID of the first tuple may be recorded andsent to a GUI that is observable by an end user. For example, theinformation along with the tuple ID of the first tuple may include thetime stamp the first tuple to enter the stream, the wait time of thefirst tuple for each queue the first tuple waited in, the processingtime for each processing element the first tuple passed through, and atime stamp of when the first tuple left the streaming environment. Thetime stamps of a tuple may include the time the tuple entered thestreaming environment through the source or a first processing elementbeing monitored by the stream manager.

In operation 816, the total execution time of a tuple may be recorded bythe stream manager. The total execution time may include the time thetuple entered the streaming environment up until the time the tuple leftthe streaming environment. The information gathered by the streammanager may provide more detailed information to the user. The detailedinformation may include the amount of time the tuple spends waitingwithin all of the queues, and the amount of time the tuple spends beingoperated on within each processing element. The detailed information canresult in the total amount of time the tuple spends within the streamingenvironment.

In various embodiments, if one or more tuples were grouped together byattributes in operation 806, the grouping of the one or more tuples maybe used to determine if an attribute of the one or more tuples causes anincrease in wait time. The wait information gathered by the streammanager may assist the end user in determining the efficiency or monitorconditions of the streaming environment.

In FIG. 9, a flowchart is illustrated of a method 900 for determining ifa processing time of a first tuple is longer than a processing time of asecond tuple within a processing element (e.g., a first same processingelement). In operation 902, one or more tuples may enter a processingelement of the streaming environment. For example, one or more tuplesmay enter a first processing element of the streaming environment. Theone or more tuples may include a first tuple and a second tuple. Thefirst tuple and the second tuple may include one or more attributes thateach includes a trait of the one or more attributes.

In operation 904, a stream manager can monitor attributes of a firsttuple and a second tuple. For example, the first tuple may contain afirst attribute with a first trait, and the second tuple may contain thefirst attribute with a second trait. The first trait and the secondtrait may be different and may be monitored for separately. For example,the attribute may be a yes or no question of a person's medical recordsas a tuple within the database. The traits could include a first yesanswer of a first person, and a second no answer of a second person.

In operation 906, the first tuple and the second tuple may be processedby a processing element (e.g., a first processing element). The firsttuple and the second tuple may enter the processing element, be operatedon by the processing element, and exit the processing element. Forexample, the first tuple may enter the processing element, be operatedon, and then leave the processing element. The second tuple may thenenter the processing element, be operated upon, and then leave theprocessing element.

In various embodiments, more than one processing element may bemonitored at a time. Each of the one or more processing elements may bemonitored to determine the processing time of the first tuple and thesecond tuple.

In various embodiments, more than the first tuple and the second tupleof the one or more tuples may be monitored. Each of the one or moretuples may be monitored as they move within the streaming environment.

In various embodiments, one or more tuples may be grouped by traits ofthe first attribute. If one or more tuples share the first trait of thefirst attribute, they may be grouped together to determine correlationsbetween processing time and attributes of the tuples.

In operation 908, the processing times of the first tuple and the secondtuple may be recorded. For example, the processing times may be recordedby a stream manager. The stream manager may record the amount of timethe first tuple and the second tuple spend within the first processingelement.

In decision block 910, it is determined whether the processing time ofthe first tuples is different from the processing time of the secondtuple. The processing times may be compared and if the processing timesare different, the flowchart may progress to operation 912. For example,the first tuple may have a processing time within the first processingelement of 2 seconds, and the second tuple may have a processing time inthe first processing element of 1 second. If the processing time of thefirst tuple and the second tuple are different, then the trait may haveaffected the processing time of the first tuple. Since the processingtime of the first tuple and the second tuple are different, theflowchart may progress to operation 912. If the processing time of thefirst tuple and the second tuple is the same, the flowchart may progressto operation 920. For example, the first tuple has a processing timewithin the first processing element of 1 second, and the second tuplehas a processing time in the first processing element of 1 second. Sincethe processing time of the first tuple and the second tuple are thesame, the flowchart may progress to operation 920.

In operation 912, the first attribute may have affected the processingtime of the first tuple or the second tuple. The attribute beingmonitored could contain a trait that causes a longer or shorterprocessing time of the tuple within the first processing element. Forexample, the first tuple may contain a trait with more information forthe first processing element to process. The more information of thetrait may cause the processing time of the first tuple to be longer thanthe processing time of the second tuple, resulting in a difference inthe processing time.

In various embodiments, the attribute of the first and second tuplesbeing monitored may not have affected the processing time. A secondattribute may have caused the difference in processing time. Forexample, if a second attribute included a first trait of the first tupleand a second trait of a second tuple mat result in the difference in theprocessing times of the first tuple and the second tuple.

In various embodiments, the processing times of the first tuple may begrouped with a first group of tuples, and the processing times of thesecond tuple may be grouped with a second group of tuples. The groupingof tuples can allow the stream monitor to pull processing times frommultiple tuples with the same trait of the attribute. By groupingmultiple tuples, an average may be taken of the group of tuples. Theaverage can include one or more tuples that include the same trait of anattribute. For example, one or more tuples may include a trait of yes asan attribute of a question. All of the tuples including the yes traitmay be grouped together, and all of the tuples with the no trait may begrouped together.

In operation 914, a user may be alerted of the difference between theprocessing time of the first tuple and the second tuple. An alert may besent to a user based on the determination that the processing time ofthe first tuple and the second tuple are different. For example, thealert may be issued to the user informing the user that the processingtime of the first tuple and the second tuple are different. The alertmay include a text based alert displayed upon a GUI.

In operation 916, the operator graph may determine an optimization ofthe operator graph based on the processing time difference of the firsttuple and the second tuple. The operator graph may be altered based onthe attribute that causes the processing time difference between thefirst tuple and the second tuple. For example, a processing element maybe added to the operator graph. A split processing element may be placedbefore the processing element to send tuples to a second processingelement if the processing time within the processing element will causetoo long of a processing time. The split processing element will gatherthe tuples with the trait of the first attribute with the longer waittime and send the tuples to a second processing element.

In operation 918, the operator graph may be optimized. If anoptimization of the operator graph is determined, the operator graph maybe optimized to increase the efficiency of the operator graph. If anoptimized operator graph is determined, then the operator graph can bechanged to the new operator graph. The optimization may includeoptimization instructions that are sent to a streams manager. Thestreams manager may then optimize the operator graph.

In operation 920, the attribute may not have affected the processingtime of the first tuple and the second tuple within the processingelement. The processing time of the first tuple and the second tuple arethe same, indicating that the attribute may not have affected theprocessing times.

In various embodiments, the optimized operator graph may be listed alongother suggestions for a streams administrator to choose. The list may bedisplayed on an interface. The interface may include one or moreoptimized operator graphs the streams administrator may choose. The listmay include optimization instructions for each optimization on the list.Upon the selection by the streams administrator a streams manager mayoptimize the operator graph.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention. The computer readable storage medium can be atangible device that can retain and store instructions for use by aninstruction execution device.

The computer readable storage medium may be, for example, but is notlimited to, an electronic storage device, a magnetic storage device, anoptical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions. These computer readable programinstructions may be provided to a processor of a general purposecomputer, special purpose computer, or other programmable dataprocessing apparatus to produce a machine, such that the instructions,which execute via the processor of the computer or other programmabledata processing apparatus, create means for implementing thefunctions/acts specified in the flowchart and/or block diagram block orblocks. These computer readable program instructions may also be storedin a computer readable storage medium that can direct a computer, aprogrammable data processing apparatus, and/or other devices to functionin a particular manner, such that the computer readable storage mediumhaving instructions stored therein comprises an article of manufactureincluding instructions which implement aspects of the function/actspecified in the flowchart and/or block diagram block or blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The descriptions of the various embodiments of the present disclosurehave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

The descriptions of the various embodiments of the present disclosurehave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

1-8. (canceled)
 9. A system for managing a streaming environment,comprising: a memory; a processor device communicatively coupled to thememory; and a stream manager communicatively coupled to the memory andthe processor device, wherein the stream manager is configured to:monitor one or more tuples within an operator graph, wherein theoperator graph further comprises: a first processing element whichoperates on one or more computer processors, and a first queue of thefirst processing element; record a wait time of the one or more tupleswithin the first queue of the first processing element; record aprocessing time of the one or more tuples within a processing stage ofthe first processing element; display, in response to recording, upon auser interface; optimize, in response to recording the processing timeof the one or more tuples, a configuration of the operator graph. 10.The system of claim 9, wherein the stream manager is further configuredto: monitor attributes of the one or more tuples, wherein the attributesfurther comprise: a set of attributes defining a tuple, and a trait foreach of the set of attributes of the tuple; monitor a first tuple with afirst trait of a first attribute; monitor a second tuple with a secondtrait of a first attribute; record the processing time of the firsttuple within the first processing element; record the processing time ofthe second tuple within the first processing element; and compare theprocessing time of the first tuple with the processing time of thesecond tuple.
 11. The system of claim 10, wherein the stream manager isfurther configured to: determine whether a first processing time of thefirst tuple in the first processing element is longer than a secondprocessing time of the second tuple in the first processing element; andalert, in response to determining that the first processing time islonger, a user that the first processing time is longer.
 12. The systemof claim 11, wherein alerting the user further comprises: informing theuser that the first trait of the first attribute caused additionalwaiting time within the first processing element; and outputting theprocessing time of the one or more tuples within the first processingelement.
 13. The system of claim 11, wherein the stream manager isfurther configured to: display the wait time of the one or more tuples;display a tuple identification number of the one or more tuples; displaya wait time of the one or more tuples within one or more processingelement; and gather wait time statistics of each of the one or moretuples based on the wait time of each of the one or more tuples.
 14. Thesystem of claim 13, wherein the wait time of the one or more tuples withthe first trait of the first attribute are grouped together separatefrom the one or more tuples with the second trait of the firstattribute.
 15. The system of claim 10, wherein the display of thestreams manager includes: displaying an optimized operator graph;receiving optimization instructions; and optimizing the configuration ofthe operator graph.
 16. A computer program product for managing astreaming environment comprising a computer readable storage mediumhaving a computer readable program stored therein, wherein the computerreadable program, when executed on a computing device, causes thecomputing device to: monitor one or more tuples within an operatorgraph, wherein the operator graph further comprises: a first processingelement which operates on one or more computer processors, and a firstqueue of the first processing element; record a wait time of the one ormore tuples within the first queue of the first processing element;record a processing time of the one or more tuples within a processingstage of the first processing element; display, in response torecording, upon a general user interface; receive, in response todisplaying upon the general user interface, optimization instructions;and optimize, in response to recording the processing time of the one ormore tuples, a configuration of the operator graph.
 17. The computerprogram product of claim 16, wherein the computer readable programfurther causes the computing device to: monitor attributes of the one ormore tuples, wherein the attributes further comprise: a set ofattributes defining a tuple, and a trait for each of the set ofattributes of the tuple; monitor a first tuple with a first trait of afirst attribute; monitor a second tuple with a second trait of a firstattribute; record the processing time of the first tuple within thefirst processing element; record the processing time of the second tuplewithin the first processing element; and compare the processing time ofthe first tuple with the processing time of the second tuple.
 18. Thecomputer program product of claim 17, wherein the computer readableprogram further causes the computing device to: determine whether afirst processing time of the first tuple in the first processing elementis longer than a second processing time of the second tuple in the firstprocessing element; and alert, in response to determining that the firstprocessing time is longer, a user that the first processing time islonger.
 19. The computer program product of claim 18, wherein thecomputer readable program further causes the computing device to:informing the user that the first trait of the first attribute causedadditional waiting time within the first processing element; andoutputting the processing time of the one or more tuples within thefirst processing element.
 20. The computer program product of claim 19,wherein the computer readable program further causes the computingdevice to: display the wait time of the one or more tuples; display atuple identification number of the one or more tuples; display a waittime of the one or more tuples within one or more processing element;and gather wait time statistics of each of the one or more tuples basedon the wait time of each of the one or more tuples.